$(window).load(function(){
	var metierDDL = $('#expertises');
	if(metierDDL) {
		metierDDL.ddlstackable();
	}
	//Valididator instanciation
	$("#registration").validate({
		errorPlacement: function(error, element) {
			error.appendTo( element.parent("div").next("div") );
		},
		rules: {
			"salutation[]":{required:true},
			firstname:{required:true},
			lastname:{required:true},
			email:{required:true,email:true},
			password:{required:true},
			confirmedpwd:{required:true,equalTo:"#password"},
			zipcode:{required:true},
			city:{required:true},
			payment:{required:true},
			"expertises[]":{required:true}
		},
		messages: {
			"salutation[]":"Champ Obligatoire",
			firstname:"Champ obligatoire",
			lastname:"Champ obligatoire",
			email:{required:"Champ obligatoire",email:"Adresse email non valide"},
			password:"Champ obligatoire",
			confirmedpwd:{required:"Champ obligatoire",equalTo:"Mot de passe different"},
			zipcode:"Champ obligatoire",
			city:"Champ obligatoire",
			payment:"Champ obligatoire"
		}
	});
});